import requests

if __name__ == '__main__':
    url = 'http://www.woniusb.com:8090/woniusales'
    # allow_redirects: 允许重定向
    resp = requests.get(url, allow_redirects=False)
    print(resp.status_code)
    print(resp.text)
    print(resp.url)
